package cloud.keveri.gateway.plugin.api;

import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

/**
 * <p>
 * 作者：沈自在
 **/
public interface KeveriPlugin {

    /**
     * 执行
     */
    Mono<Void> process(ServerWebExchange exchange, KeveriPluginChain chain);

    /**
     * 顺序
     */
    int getOrder();

    /**
     * 是否跳过
     */
    default boolean skip(ServerWebExchange exchange) {
        return false;
    }
}
